package com.smz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TProductOrder {

    @TableId(type = IdType.AUTO)
    private int id;
    private int orderId;
    private String orderType;
    private int productId;
    private int customId;
    private String payType;
    private double money;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.sql.Timestamp dealTime;
    private int number;
    private String orderStatus;
    @TableField(value = "`explain`")
    private String explain;
    private String operator;
    private String productPlanNo;
    private String productLineId;
    private java.sql.Timestamp productPlanTime;
    private java.sql.Timestamp productPlanOvertime;
    private String remark;
    private String productStatus;
    private String printer;
    private java.sql.Timestamp productTime;
    private String laserCode;


    /**
     * ggy
     */
    @TableField(exist = false)
    private Customer customerGgy;
    @TableField(exist = false)
    private TProduct tProductGgy;


    @TableField(exist = false)
    private Commodity commodity;
    @TableField(exist = false)
    private TProductionLine productionLine;

    @TableField(exist = false, value = "p_enterprise")
    @JsonProperty("pEnterprise")
    private String PEnterprise;
    @TableField(exist = false, value = "p_name")
    @JsonProperty("pName")
    private String PName;
    @TableField(exist = false, value = "production_name")
    @JsonProperty("productionName")
    private String productionName;

 /*   public void setProductStatus(String productStatus) {
        switch (productStatus) {
            case "1": {
                this.productStatus = "待排单";
                break;
            }
            case "2": {
                this.productStatus = "待生产";
                break;
            }
            case "3": {
                this.productStatus = "生产中";
                break;
            }
            case "4": {
                this.productStatus = "已入库";
                break;
            }
            case "5": {
                this.productStatus = "已结束";
                break;
            }
            default:
                this.productStatus = productStatus;
        }
    }*/
}
